<?php
$slider = $tc->slider_banner(1,$lang,$row_menu_one['id']);
if(!@$danhmuc){
	$view_slider = '<link rel="stylesheet" type="text/css" href="assets/preview.css"/>
	<link rel="stylesheet" type="text/css" href="assets/wt-rotator.css"/>
	<script type="text/javascript" src="assets/jquery.wt-rotator.min.js"></script>
	<script type="text/javascript" src="assets/preview.js"></script>
	
	<div id="slider">
	<div class="panel">
		<div class="container">
			<div class="wt-rotator">
				<a href="#"></a>            
				<div class="desc"></div>
				<div class="preloader"></div>
				<div class="c-panel">
					<div class="buttons">
						<div class="prev-btn"></div>
						<div class="play-btn"></div>    
						<div class="next-btn"></div>               
					</div>
					<div class="thumbnails"><ul>';
					while($row_slider = mysql_fetch_array($slider)){
						$view_slider .= '
						<li>
							<a href="'.url_slider_image.$row_slider['url_hinh'].'" title="'.$row_slider["name"].'"></a>
							<a href="'.$row_slider["link"].'" target="_blank"></a> 
							<div class="info">
							   <div class="cap-title">'.$row_slider["info"].'</div>
							</div>                         
						</li>';
					}
					
						$view_slider .= '</ul>
					</div>     
				</div>
			</div>	
	  </div>
	</div>
	</div>
	<script type="text/javascript">
	$(document).ready(function(){
		$("body").css("background","url(images/bg.gif) repeat-x");
	});
	</script>';
}else{
	if(mysql_num_rows($slider)>0){
		$row_slider = mysql_fetch_array($slider);
		$view_slider = '<div id="slider_l">'.$row_slider['info'].'</div>
		<div id="slider_r"><img src="'.url_slider_image.$row_slider['url_hinh'].'" alt="'.$row_slider['name'].'" /></div>
		<div style="clear:both; height:25px"></div>
		<script type="text/javascript">
		$(document).ready(function(){
			$("body").css("background","url(images/bg-2.gif) repeat-x");
		});
		</script>';
	}else{
		$view_slider = '<div style="clear:both; height:25px"></div>
		<script type="text/javascript">
		$(document).ready(function(){
			$("body").css("background","url(images/bg-2.gif) repeat-x");
		});
		</script>';
	}
}
echo $view_slider;